package com.devplatform.mapper.article;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.devplatform.pojo.article.ArticleAttachment;
import com.devplatform.pojo.dto.ArticleAttachmentDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Jnks03
 * @description 针对表【article_attachment(文章附件表)】的数据库操作Mapper
 * @createDate 2025-10-03 22:50:21
 * @Entity com.devplatform.pojo.article.ArticleAttachment
 */
public interface ArticleAttachmentMapper extends BaseMapper<ArticleAttachment> {
    //批量插入附件
    void batchInsert(@Param("list") List<ArticleAttachment> attachments);

    //根据文章ID删除附件
    void deleteByArticleId(@Param("articleId") Long articleId);

    //根据文章ID查询附件
    List<ArticleAttachmentDto> selectByArticleId(@Param("articleId") Long articleId);
}




